package com.hsd.whb.exception;


import com.hsd.whb.enums.ResultEnum;
import lombok.Data;
import lombok.Getter;

@Getter
public class HwbException extends RuntimeException {

    private Integer code;

    public HwbException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public HwbException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public HwbException(String message) {
        super(message);
        this.code = ResultEnum.PARAM_ERROR.getCode();
    }
}
